package com.lichuang.dedao.ebook.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lichuang.dedao.ebook.entity.EBook1;
import com.lichuang.dedao.ebook.service.impl.EBookServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 电子书 前端控制器
 * </p>
 *
 * @author miaomiao
 * @since 2019-07-12
 */
@RestController
@RequestMapping("/e-book")
public class EBookController {
    @Autowired
    private EBookServiceImpl eBookService;
//    查詢所有
    @RequestMapping("/getAllEBook")
    public List<EBook1> getAllEBook() {
        return eBookService.selectIEBooks();
    }
//      LIKE '%值%'
//     @param condition 执行条件
//     @param column    字段
//     @param val       值
//    @return children
@RequestMapping("/gatEBookByName")
    public List<EBook1> gatEBookByName(String name){
        return eBookService.selectIEBooksByName(name);
    }
}
